import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { ConfigProvider } from 'antd'
import './index.css'
import App from './App'
import useStore from './store/useStore'

// 配置Ant Design中文语言
import zhCN from 'antd/locale/zh_CN'

// 初始化全局状态
useStore.getState().setNavbarSticky(false)

createRoot(document.getElementById('root')!).render(
  //问题：严格模式找不到baiduMAP,闪退
/*   <StrictMode> */
    <ConfigProvider
      locale={zhCN}
      theme={{
        token: {
          colorPrimary: '#1890ff',
          borderRadius: 4,
        }
      }}
    >
      <App />
    </ConfigProvider>
/*   </StrictMode> */
)
